package meituan.summer11;

/**
 * @Author Fizz Pu
 * @Date 2021/4/29 下午4:19
 * @Version 1.0
 * 失之毫厘，缪之千里！
 */

// bug被解决了
// 比较错误

import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        while (scanner.hasNextLine()) {
            String firstLine = scanner.nextLine();
            String secondLine = scanner.nextLine();
            String[] sequence = firstLine.split(" ");
            String[] weights = secondLine.split(" ");

            int maxProductNumber = Integer.parseInt(sequence[0]);
            int currentProductNumber = Integer.parseInt(sequence[1]);
            int buyMin = Integer.parseInt(sequence[2]);
            int buyMax = Integer.parseInt(sequence[3]);

            if (buyMin > buyMax) {
                int tmp = buyMax;
                buyMax = buyMin;
                buyMin= tmp;
            }

            // 求出已经生产出的的产品的最大值和最小值
            int weightMin = Integer.MAX_VALUE;
            int weightMax = Integer.MIN_VALUE;
            for (String weight : weights) {
                int tmp = Integer.parseInt(weight);
                if (tmp >= weightMax) {
                    weightMax = tmp;
                }

                if (tmp <= weightMin) {
                    weightMin = tmp;
                }
            }

            // 求出当前这个人还要买几个蛋糕
            int restCount = 2;
            if (weights.length == 1) {
                if (weightMax == buyMax || weightMin == buyMin) {
                    restCount = 1;
                }
            }
            else if (weights.length >= 2) {
                if (weightMax == buyMax) {
                    restCount--;
                }

                if (weightMin == buyMin) {
                    restCount--;
                }
            }

            if(maxProductNumber - currentProductNumber < restCount){
                System.out.println("NO");
            }
            else {
                if(buyMax >= weightMax && buyMin <= weightMin){
                    System.out.println("YES");
                }
                else {
                    System.out.println("NO");
                }
            }
        }
    }
}
